cmake_minimum_required(VERSION 2.8)
SET(CMAKE_CXX_FLAGS "-g")


# OpenCV include
include_directories(/usr/local/include/flann)
include_directories(/usr/include/ni)
include_directories(/usr/include/pcl-1.0)
include_directories(/usr/include/pcl-1.1)

include_directories(/usr/include/ni)
include_directories(/usr/include/GL)
include_directories(/usr/local/include/opencv)

include_directories(${EIGEN_PATH})

# Where to look for library files
link_directories(/usr/lib)
link_directories(./libs)
link_directories(/usr/local/lib)
link_directories(/usr/local/pkg/matlab/bin/glnx86)
link_directories(${OUTPUT})

#OPTION(TESTGUI NO)
#
#if(TESTGUI)
# Find QT4
#find_package( Qt4 REQUIRED )
#include(${QT_USE_FILE})
#add_subdirectory(test/TesterGUI)
#endif(TESTGUI)


#OPTION(LIB_CONTEXT_LEARNER YES)

#if(LIB_CONTEXT_LEARNER)

include_directories(IntegralImageFeatures/new_Features)
include_directories(IntegralImageFeatures)
include_directories(${PROJECT_ROOT}/src)

add_subdirectory(IntegralImageFeatures/new_Features)
add_subdirectory(IntegralImageFeatures)
add_subdirectory(Classifiers)




# PointCloud Library
add_library(pointcloud PointCloud.cpp Point.cpp)
target_link_libraries(pointcloud pcl_io pcl_common pcl_features)
target_link_libraries(pointcloud pcl_kdtree pcl_keypoints)
target_link_libraries(pointcloud pcl_range_image_border_extractor pcl_range_image)
target_link_libraries(pointcloud pcl_surface)
install(TARGETS pointcloud DESTINATION ${OUTPUT})
add_library(contextlearner STATIC ContextLearner.cpp)
target_link_libraries(contextlearner modified_svm gradient_boosting echo_data integralimagefeature compositfeature pointcloud opencv_core opencv_highgui)
#opencv_core opencv_highgui
install(TARGETS contextlearner DESTINATION ${OUTPUT})
#endif(LIB_CONTEXT_LEARNER)

#OPTION(LIB_CONTEXT_LEARNER_TESTER YES)
#if(LIB_CONTEXT_LEARNER_TESTER)
add_subdirectory(test)
#endif(LIB_CONTEXT_LEARNER_TESTER)
